
package com.xx.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName cqcet.index copy
 * @description  
 */
@Data
@TableName("cqcet.index copy")
@ApiModel
public class Index copy implements Serializable {
    
    /**
     * article
	 * 
     */
    @ApiModelProperty("article")
    private String article;
				
    /**
     * dataset
	 * 
     */
    @ApiModelProperty("dataset")
    private String dataset;
				
    /**
     * datasource
	 * 
     */
    @ApiModelProperty("datasource")
    private String datasource;
				
    /**
     * dataview
	 * 
     */
    @ApiModelProperty("dataview")
    private String dataview;
				
    /**
     * index copy
	 * 
     */
    @ApiModelProperty("index copy")
    private String index copy;
				
    /**
     * job
	 * 
     */
    @ApiModelProperty("job")
    private String job;
				
    /**
     * pject
	 * 
     */
    @ApiModelProperty("pject")
    private String pject;
				
	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty("ID")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
			
	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty("创建时间")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createTime;
				  
	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty("创建时间")
	private String createTimeString;
					
	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.UPDATE)
	@ApiModelProperty("更新时间")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateTime;
					
	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.UPDATE)
	@ApiModelProperty("更新时间")
	private String updateTimeString;
					
	/**
	 * 逻辑删除控制
	 */
	@ApiModelProperty("逻辑删除控制")
	@TableLogic
	private Integer state;
			  
	/**
	 * 单位
	 */
	@TableField(fill = FieldFill.INSERT)
	@ApiModelProperty("单位")
	private String unitId;
					
	
	/**
	 * 设置article
	 */
	public void setArticle(String article){
		this.article = article;
	}

	/**
	 * 获取article
	 */
	public String getArticle(){
		return this.article;
	}
		
	/**
	 * 设置dataset
	 */
	public void setDataset(String dataset){
		this.dataset = dataset;
	}

	/**
	 * 获取dataset
	 */
	public String getDataset(){
		return this.dataset;
	}
		
	/**
	 * 设置datasource
	 */
	public void setDatasource(String datasource){
		this.datasource = datasource;
	}

	/**
	 * 获取datasource
	 */
	public String getDatasource(){
		return this.datasource;
	}
		
	/**
	 * 设置dataview
	 */
	public void setDataview(String dataview){
		this.dataview = dataview;
	}

	/**
	 * 获取dataview
	 */
	public String getDataview(){
		return this.dataview;
	}
		
	/**
	 * 设置index copy
	 */
	public void setIndex copy(String index copy){
		this.index copy = index copy;
	}

	/**
	 * 获取index copy
	 */
	public String getIndex copy(){
		return this.index copy;
	}
		
	/**
	 * 设置job
	 */
	public void setJob(String job){
		this.job = job;
	}

	/**
	 * 获取job
	 */
	public String getJob(){
		return this.job;
	}
		
	/**
	 * 设置pject
	 */
	public void setPject(String pject){
		this.pject = pject;
	}

	/**
	 * 获取pject
	 */
	public String getPject(){
		return this.pject;
	}
		
	/**
	 * 设置ID
	 */
	public void setId(Long id){
		this.id = id;
	}

	/**
	 * 获取ID
	 */
	public Long getId(){
		return this.id;
	}
		
	/**
	 * 设置创建时间
	 */
	public void setCreateTime(Long createTime){
		this.createTime = createTime;
	}

	/**
	 * 获取创建时间
	 */
	public Long getCreateTime(){
		return this.createTime;
	}
		
	/**
	 * 设置创建时间
	 */
	public void setCreateTimeString(String createTimeString){
		this.createTimeString = createTimeString;
	}

	/**
	 * 获取创建时间
	 */
	public String getCreateTimeString(){
		return this.createTimeString;
	}
		
	/**
	 * 设置更新时间
	 */
	public void setUpdateTime(Long updateTime){
		this.updateTime = updateTime;
	}

	/**
	 * 获取更新时间
	 */
	public Long getUpdateTime(){
		return this.updateTime;
	}
		
	/**
	 * 设置更新时间
	 */
	public void setUpdateTimeString(String updateTimeString){
		this.updateTimeString = updateTimeString;
	}

	/**
	 * 获取更新时间
	 */
	public String getUpdateTimeString(){
		return this.updateTimeString;
	}
		
	/**
	 * 设置逻辑删除控制
	 */
	public void setState(Integer state){
		this.state = state;
	}

	/**
	 * 获取逻辑删除控制
	 */
	public Integer getState(){
		return this.state;
	}
		
	/**
	 * 设置单位
	 */
	public void setUnitId(String unitId){
		this.unitId = unitId;
	}

	/**
	 * 获取单位
	 */
	public String getUnitId(){
		return this.unitId;
	}
		
	public String stringify(){
		String rc = "{\"article\":\"" + this.getArticle() + "\",\"dataset\":\"" + this.getDataset() + "\",\"datasource\":\"" + this.getDatasource() + "\",\"dataview\":\"" + this.getDataview() + "\",\"index copy\":\"" + this.getIndex copy() + "\",\"job\":\"" + this.getJob() + "\",\"pject\":\"" + this.getPject() + "\",\"id\":\"" + this.getId() + "\",\"createTime\":\"" + this.getCreateTime() + "\",\"createTimeString\":\"" + this.getCreateTimeString() + "\",\"updateTime\":\"" + this.getUpdateTime() + "\",\"updateTimeString\":\"" + this.getUpdateTimeString() + "\",\"state\":\"" + this.getState() + "\",\"unitId\":\"" + this.getUnitId() + "\"}";
		rc = rc.replaceAll("\"null\"","null").replaceAll("\"([0-9]+)\"","$1");
        return rc;
	}

	public static Index copy JSONparse(String jsonString) throws JsonProcessingException {
        if(jsonString == null) return null;
		try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.readValue(jsonString,Index copy.class);
        }catch (JsonProcessingException e){
            return null;
        }
    }
}
    